﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JsonEditor.Common
{
    public class ListConverter : StringConverter
    {

        object[] m_Objects;

        public ListConverter(object[] objects)
        {

            m_Objects = objects;

        }



        public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
        {

            return true;

        }

        public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
        {

            return true;

        }



        public override

        System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {

            return new StandardValuesCollection(m_Objects);

        }

    }
    public class ListIntConverter : Int64Converter
    {

        object[] m_Objects;

        public ListIntConverter(object[] objects)
        {

            m_Objects = objects;

        }



        public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
        {

            return true;

        }

        public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
        {

            return true;

        }



        public override

        System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {

            return new StandardValuesCollection(m_Objects);

        }

    } 
}
